﻿@model IEnumerable<orienta.ViewModels.ReportePrograma>

@{
    Layout = "";
    decimal pension = 0;
    decimal beca = 0;
    decimal vaso = 0;
    decimal pronaa = 0;
    decimal cuna = 0;
    decimal qali = 0;
}


<table class="choices" cellspacing="0" >
<thead>
    <tr>
        <th>
            Region
        </th>
        <th>
            Genero
        </th>
        <th>
            Pension 65
        </th>
        <th>
            Beca 18
        </th>
        <th>
            Vaso de Leche
        </th>
        <th>
            Pronaa
        </th>
        <th>
            Cuna
        </th>   
        <th>Qali</th>
        <th>Total</th>
    </tr>
 </thead>
<tbody>
@foreach (var item in Model)
{
    if (item.genero != null)
    {
        pension = pension + item.pension_;
        beca = beca + item.beca_;
        vaso = vaso + item.vaso_;
        pronaa = pronaa + item.pronaa_;
        cuna = cuna + item.cuna_;
        qali = qali + item.qali_;
    <tr>
        <td >
            @Html.DisplayFor(modelItem => item.dependencia) 
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.genero)
        </td>
        <td >
             @String.Format("{0:0.00%}", item.pension_)
        </td>
        <td>
             @String.Format("{0:0.00%}", item.beca_)
        </td>
        <td>
            @String.Format("{0:0.00%}", item.vaso_)
        </td>
        <td>
             @String.Format("{0:0.00%}", item.pronaa_)
        </td>
        <td>
             @String.Format("{0:0.00%}", item.cuna_)
        </td>
        <td>
             @String.Format("{0:0.00%}", item.qali_)
        </td>
        <td>
            @String.Format("{0:0.00%}", item.total_())
        </td>
       
    
    </tr>
    }
}

    <tr>
        <td colspan="2">
            TOTAL GENERAL
        </td>
        <td>
            @String.Format("{0:0.00%}",pension)
        </td>
        <td>
            @String.Format("{0:0.00%}",beca)
        </td>
        <td>
            @String.Format("{0:0.00%}",vaso)
        </td>
        <td>
            @String.Format("{0:0.00%}",pronaa)
        </td>
        <td>
            @String.Format("{0:0.00%}",cuna)
        </td>
        <td>
            @String.Format("{0:0.00%}",qali)
        </td>
<td>100.00%
</td>

       
    
    </tr>

</tbody>

</table>
